import {
	get,
	post
} from '../request.js'

//红木列表state->0:正常红木,1:封存红木
export const readWoodList = (state, page) => post('/redwood/management/list/' + state, page)

//指派买家
export const fingerBuyUserInfo = (id, invitationCode) => get('/redwood/management/fingerBuyUser', {
	id,
	invitationCode
})

//随机拆分
export const randomSplitInfo = (id, num) => get('/redwood/management/random/split', {
	id,
	num
})

//自定义拆分
export const splitInfo = (id, prices) => post('/redwood/management/split', {
	id,
	prices
})

//封存或者解封
export const updateSealState = (id, state) => get('/redwood/management/seal/' + state, {
	id
})

//转场
export const transition = (id, storeNumber) => get('/redwood/management/transition', {
	id,
	storeNumber
})

//转移记录
export const transitionRecord = (state) => get('/redwood/management/transition/list/' + state)

//修改转移状态
export const transitionState = (id, state) => get('/redwood/management/transition/state/', {
	id,
	state
})